unbind-key C-b
set -g prefix C-s
bind-key C-s send-prefix

# run -b '~/.tmux/plugins/tpm/tpm'

# set-option -sa terminal-overrides ',XXX:RGB'
set -s escape-time 0
set-option -sa terminal-overrides ",xterm*:Tc"

setw -g mode-keys vi
set -g mouse off
# set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'tmux-plugins/tmux-pain-control'
# set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# set -g @prefix_highlight_show_copy_mode 'on'
# set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow'
# set -g @prefix_highlight_prefix_prompt 'Wait'
# set -g @prefix_highlight_copy_prompt 'Copy'
# prefix + ctrl-f - simple file search
# prefix + ctrl-g - jumping over git status files (best used after git status command)
# prefix + alt-h - jumping over SHA-1/SHA-256 hashes (best used after git log command)
# prefix + ctrl-u - url search (http, ftp and git urls)
# prefix + ctrl-d - number search (mnemonic d, as digit)
# prefix + alt-i - ip address search
# set -g @plugin 'tmux-plugins/tmux-copycat'
# prefix + u
# set -g @plugin 'tmux-plugins/tmux-urlview'
# set -g @plugin 'jbnicolai/tmux-fpp'
# copy-mode: 
# y copy selected text.
# Y copy selected text to command line.
# Normal mode
# prefix-y copy current command line text
# prefix-Y copy current pane's buffer
# set -g @plugin 'tmux-plugins/tmux-yank'
# set-option -ga terminal-overrides ",*256col*:Tc"

###########################################################################
#                                  图形                                   #
###########################################################################
set -g default-terminal "screen-256color"
set -g base-index 1
set -g pane-base-index 1

#bind -r c-h run "tmux select-pane -L"
#bind -r c-j run "tmux select-pane -D"
#bind -r c-k run "tmux select-pane -U"
#bind -r c-l run "tmux select-pane -R"
#bind -r C-\\ run "tmux select-pane -l"
bind -r Enter run "tmux set-option -g mouse;tmux display-message 'toggle mouse mode'"
setw -g mode-keys vi
#bind -T copy-mode-vi 'v' begin-selection
#bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

#
# set-option -g default-command "reattach-to-user-namespace -l bash"
#
# bind a reload key
bind R source-file ~/.tmux.conf \; display-message "Config reloaded.."

# Status bar
# colors
set -g status-bg black
set -g status-fg white
# alignment
set-option -g status-justify centre
# spot at left
set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#S#[fg=green]]'
# set-option -g status-left-length 20
# window list
setw -g automatic-rename on
set-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey,dim]'
set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]'
# spot at right
set -g status-right '#[fg=green][#[fg=cyan]%Y-%m-%d#[fg=green]'

# set-option -sg escape-time 10
# set -g default-terminal "screen-256color"

# set-option -g mouse on

# vim:set foldenable ft=tmux foldmethod=marker: 
